#include "mainwindow.h"
#include "ui_mainwindow.h"


MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
    // Set up the graphics canvas
    //canvas( ui->centralWidget )
{
    ui->setupUi(this);

    // set canvas dimensions
    canvas.setGeometry( 0, 0, this->geometry().width(), this->geometry().height() );
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::setDimensions( int x, int y, int w, int h )
{
    this->setGeometry( x, y, w, h );
    canvas.setGeometry( 0, 0, w, h );
}

void MainWindow::refresh()
{
    this->show();
    canvas.getView()->show();
}
